﻿using MediatR;

namespace HMediatR
{
    public interface IDoMainEvent
    {
        /// <summary>
        /// 获取所有注册的领域事件
        /// </summary>
        /// <returns></returns>
        List<INotification> GetAllEvents();
        /// <summary>
        /// 添加领域事件
        /// </summary>
        /// <param name="notification"></param>

        void AddEvent(INotification notification);
        /// <summary>
        /// 添加领域事件(避免重复添加)
        /// </summary>
        /// <param name="notification"></param>
        void AddNotExistEvent(INotification notification);
        /// <summary>
        /// 移除所有领域事件
        /// </summary>
        void RemoveEvent();
    }
}